package a.j;

import a.c.d;
import a.c.k;
import a.d.w;
import a.f.ec;
import a.f.zc;
import a.i.p;

public class j
  extends p
  implements k
{
  private a_ c;
  public static int d;
  
  public j(g paramg, boolean paramBoolean)
  {
    this(paramg, true, paramBoolean);
  }
  
  public j(g paramg, boolean paramBoolean1, boolean paramBoolean2)
  {
    if (!ld.E)
    {
      if (paramg == null) {
        throw new NullPointerException();
      }
      this.c = new a_(paramg, paramBoolean1, paramBoolean2);
    }
  }
  
  public Object get(Object paramObject)
  {
    if (!ld.E) {
      if (!(paramObject instanceof d)) {
        return null;
      }
    }
    d locald = (d)paramObject;
    this.c.h = locald;
    return this.c;
  }
  
  static final class a_
    implements ec
  {
    private g c;
    private boolean e;
    private boolean g;
    d h;
    Point2D.Double i = new Point2D.Double();
    
    a_(g paramg, boolean paramBoolean1, boolean paramBoolean2)
    {
      this.c = paramg;
      this.e = paramBoolean2;
      this.g = paramBoolean1;
    }
    
    public w a(zc paramzc, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if (!bool2) {
        if (this.e)
        {
          if (bool2) {
            break label62;
          }
          localld = this.c.w(this.h.e());
          if (!bool1) {
            break label64;
          }
        }
      }
      label62:
      ld localld = this.c.w(this.h.f());
      label64:
      double d1 = localld.A();
      double d2 = localld.B();
      if (!bool2) {
        if (localld.f(d1 + paramDouble1, d2 + paramDouble2)) {
          return null;
        }
      }
      if (!bool2)
      {
        if (localld.c() == paramzc.c()) {
          if (bool2) {
            break label154;
          }
        }
      }
      else {
        if (localld.d() == paramzc.d()) {
          break label144;
        }
      }
      return null;
      label144:
      label154:
      double d3 = d1 + paramDouble1 - paramDouble3 * 5.0D;
      double d4 = d2 + paramDouble2 - paramDouble4 * 5.0D;
      double d5 = 10.0D + Math.max(localld.c(), localld.d());
      double d6 = d1;
      double d7 = d2;
      int j = 0;
      double d8 = 0.0D;
      do
      {
        if (d8 >= d5 * 2.0D) {
          break;
        }
        double d9 = d3 + paramDouble3 * d8;
        double d10 = d4 + paramDouble4 * d8;
        if (bool1) {
          break label314;
        }
        if (localld.f(d9, d10))
        {
          d6 = d9;
          d7 = d10;
          d3 = d6 - paramDouble3 * 2.0D;
          d4 = d7 - paramDouble4 * 2.0D;
          j = 1;
          if (!bool2) {
            if (!bool1) {
              break;
            }
          }
        }
        else
        {
          d8 += 1.0D;
        }
      } while (!bool1);
      if ((!bool2) && (j != 0))
      {
        label314:
        if (localld.b(d6, d7, d3, d4, this.i)) {
          return new w(this.i.x - d1, this.i.y - d2);
        }
        return new w(paramDouble1, paramDouble2);
      }
      if ((bool2) || (this.g))
      {
        if (localld.b(d1, d2, d1 + paramDouble1, d2 + paramDouble2, this.i)) {
          return new w(this.i.x - d1, this.i.y - d2);
        }
        return new w(paramDouble1, paramDouble2);
      }
      return null;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.j

 * JD-Core Version:    0.7.0.1

 */